<div class="navbar navbar-default navbar-static-top" ng-controller="NavbarCtrl">
  <div class="container">
    <div class="navbar-header">
      <button class="navbar-toggle" type="button" ng-click="isCollapsed = !isCollapsed">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <div class="navbar-brand">
        <a href="/" target="_self">
          <span style="font-weight:bold;color:#428bca;">ripple<font style="font-weight:bold;color:#FF9933;">OK</font></span>
        </a>
      </div>
    </div>
    <div collapse="isCollapsed" class="navbar-collapse collapse" id="navbar-main">
      <ul class="nav navbar-nav">
        <li ng-repeat="item in menu" ng-class="{active: isActive(item.link)}">
          <a ng-href="{{item.link}}">{{item.title}}</a>
        </li>
        <li ng-show="isAdmin()" ng-class="{active: isActive('/admin')}">
          <a href="/admin">Admin</a>
        </li>
      </ul>
      <ul class="nav navbar-nav">
        <li ng-cloak>
          <a href="./ledger/ledger.html#32570" target="_blank">{{lang==0?'Ledger':'总账'}}</a>
        </li>
        <li ng-cloak>
          <a href="./ledger/transaction.html" target="_blank">{{lang==0?'Transaction':'交易'}}</a>
        </li>
        <li ng-cloak>
          <a href="./ledger/account.html" target="_blank">{{lang==0?'Account':'账号'}}</a>
        </li>
        <li ng-cloak>
          <a href="./ledger/gateway.html#CNY.razqQKzJRdB4UxFPWf5NEpEG3WMkmwgcXA" target="_blank">{{lang==0?'Gateway':'网关'}}</a>
        </li>
      </ul>

      <ul class="nav navbar-nav navbar-right" ng-hide="true">
        <li ng-hide="isLoggedIn()" ng-class="{active: isActive('/signup')}">
          <a href="/signup">Sign up</a>
        </li>
        <li ng-hide="isLoggedIn()" ng-class="{active: isActive('/login')}">
          <a href="/login">Login</a>
        </li>
        <li ng-show="isLoggedIn()">
          <p class="navbar-text">Hello {{ getCurrentUser().name }}</p>
        </li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('/settings')}">
          <a href="/settings">
            <span class="glyphicon glyphicon-cog"></span>
          </a>
        </li>
        <li ng-show="isLoggedIn()" ng-class="{active: isActive('/logout')}">
          <a href="" ng-click="logout()">Logout</a>
        </li>
      </ul>
      <form class="navbar-form navbar-right" style="width:600px" target="_blank" METHOD="get">
        <div class="input-group">
          <input type="text" class="form-control" ng-model="xid" ng-keypress="($event.which === 13)?clickQuery():0" placeholder="r...address ~name LedgerIndex TXhash">
          <span class="input-group-addon">
            <i class="fa fa-search" style="cursor:pointer" ng-click="clickQuery()"></i>
          </span>
        </div>
      </form>
    </div>
  </div>
</div>
